import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 87111
 * Date: 2025-11-04
 * Time: 17:09
 */
public class Demo1 {
    public static void main(String[] args) {
        //线程池中最大线程数为5个
        ExecutorService thread1 = Executors.newFixedThreadPool(5);
        //线程数量无上限的线程池
        ExecutorService thread2 =  Executors.newCachedThreadPool();
    }
}
